package com.krlin.soccer.soccer.service;

import com.krlin.soccer.soccer.entity.Complete;
import com.krlin.soccer.soccer.mapper.CompleteMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompleteService {

    @Autowired
    CompleteMapper completeMapper;

    public List<Complete> getAllComplete() {
        return completeMapper.selectAll();
    }

    public Complete selectOneById(Integer id) {
        return completeMapper.selectByPrimaryKey(id);
    }

    public int insertOne(Complete complete) {
        return completeMapper.insertSelective(complete);
    }

    public int updateOne(Complete complete) {
        return completeMapper.updateByPrimaryKeySelective(complete);
    }

    public int deleteOne(Integer id) {
        return completeMapper.deleteByPrimaryKey(id);
    }
}
